﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class BAdMachine
    {
        private readonly DAdMachine dAdMachine = new DAdMachine();

        public bool Exists(string number)
        {
            return dAdMachine.Exists(number);
        }


        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Model.ADMachineInfo model)
        {
            return dAdMachine.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Model.ADMachineInfo model)
        {
            return dAdMachine.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public bool Delete(string number)
        {
            return dAdMachine.Delete(number);
        }

        /// <summary>
        /// 批量删除数据
        /// </summary>
        public bool DeleteList(string idlist)
        {
            return dAdMachine.DeleteList(idlist);
        }


        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.ADMachineInfo GetModel(int id)
        {
            return dAdMachine.GetModel(id);
        }

        /// <summary>
        /// 获得数据列表--投诉司机
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dAdMachine.GetList(strWhere);
        }


         public int UpdateUrlInList(string adUrl, string stationlist)
         {
             return dAdMachine.UpdateUrlInList(adUrl, stationlist);
         }

         public string GetAdUrlByNumber(string number)
         {
             return dAdMachine.GetAdUrlByNumber(number);
         }
    }
}
